import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios';
import animate from "animate.css"
import "animate.css/"
// 第三方动画库
import "animate.css/animate.css"

// 懒加载
import VueLazyLoad from 'vue-lazyload';

// 使用elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI)
Vue.use(animate)
Vue.use(VueLazyLoad, {
  // 设置v-lazy中的默认图片
  loading: require('./assets/img/common/placeholder.png')
})


Vue.config.productionTip = false

// 使用bus总线
Vue.prototype.$bus = new Vue()

// https://www.liulongbin.top:8888/api/private/v1/  admin 123456
// https://lianghj.top:8888/api/private/v1/ admin 12345678
axios.defaults.baseURL = 'https://www.liulongbin.top:8888/api/private/v1/'
axios.interceptors.request.use(config => {
  // console.log(config);
  config.headers.Authorization = window.localStorage.getItem('token')
  // 在最后必须return config
  return config
})

Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
